// <com.woyouqiu.Copyright>
// --------------------------------------------------------------
// <copyright>上海有求网络科技有限公司 2015</copyright>
// <Solution>Vecen.BangChuang</Solution>
// <Project>Vecen.BangChuang.Application</Project>
// <FileName>IUserAddressAppService.cs</FileName>
// <CreateTime>2017-04-27 22:56</CreateTime>
// <Author>何苗</Author>
// <Email>hemiao@woyouqiu.com</Email>
// <log date="2017-04-27 22:56" version="00001">创建</log>
// --------------------------------------------------------------
// </com.woyouqiu.Copyright>

using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using Vecen.BangChuang.BangChuang.Mall.Dtos;

namespace Vecen.BangChuang.BangChuang.Mall {
    /// <summary>
    /// 用户收货地址操作
    /// </summary>
    public interface IUserAddressAppService: IApplicationService {

        /// <summary>
        /// 添加收货地址
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task CreateAsync(UserAddressCreateRequestDto input);

        /// <summary>
        /// 获得当前用户的所有收货地址
        /// </summary>
        /// <returns></returns>
        Task<ListResultDto<UserAddressOutDto>> GetUserAddressesAsync();

        /// <summary>
        /// 设置某个地址为默认
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task SetDefaultAsync(int id);


        /// <summary>
        /// 获取当前用户默认收货地址
        /// </summary>
        /// <returns></returns>
        Task<UserAddressOutDto> GetDefaultAsync();

        /// <summary>
        /// 删除收货地址
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteAsync(int id);

        /// <summary>
        /// 修改收货地址
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task UpdateAddressAsync(UserAddressCreateRequestDto input);
    }
}